Optimal. Leaf size=83 \[ \frac {F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \tan (e+f x) \left (a+b+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a+b}\right )^{-p}}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {4231, 441, 440}
\begin {gather*} \frac {\tan (e+f x) \left (a+b \tan ^2(e+f x)+b\right )^p \left (\frac {b \tan ^2(e+f x)}{a+b}+1\right )^{-p} F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 440
Rule 441
Rule 4231
Rubi steps
\begin {align*} \int \cos ^6(e+f x) \left (a+b \sec ^2(e+f x)\right )^p \, dx &=\frac {\text {Subst}\left (\int \frac {\left (a+b+b x^2\right )^p}{\left (1+x^2\right )^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\left (\left (a+b+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a+b}\right )^{-p}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {b x^2}{a+b}\right )^p}{\left (1+x^2\right )^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \tan (e+f x) \left (a+b+b \tan ^2(e+f x)\right )^p \left (1+\frac {b \tan ^2(e+f x)}{a+b}\right )^{-p}}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(1914\) vs. \(2(83)=166\).
time = 17.52, size = 1914, normalized size = 23.06 \begin {gather*} \frac {3 (a+b) F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \cos ^5(e+f x) (a+2 b+a \cos (2 (e+f x)))^p \sec ^2(e+f x)^{-4+p} \left (a+b \sec ^2(e+f x)\right )^p \sin (e+f x)}{f \left (3 (a+b) F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p F_1\left (\frac {3}{2};4,1-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-4 (a+b) F_1\left (\frac {3}{2};5,-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)\right ) \left (\frac {3 (a+b) F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) (a+2 b+a \cos (2 (e+f x)))^p \sec ^2(e+f x)^{-3+p}}{3 (a+b) F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p F_1\left (\frac {3}{2};4,1-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-4 (a+b) F_1\left (\frac {3}{2};5,-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)}-\frac {6 a (a+b) p F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) (a+2 b+a \cos (2 (e+f x)))^{-1+p} \sec ^2(e+f x)^{-4+p} \sin (2 (e+f x)) \tan (e+f x)}{3 (a+b) F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p F_1\left (\frac {3}{2};4,1-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-4 (a+b) F_1\left (\frac {3}{2};5,-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)}+\frac {6 (a+b) (-4+p) F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) (a+2 b+a \cos (2 (e+f x)))^p \sec ^2(e+f x)^{-4+p} \tan ^2(e+f x)}{3 (a+b) F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p F_1\left (\frac {3}{2};4,1-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-4 (a+b) F_1\left (\frac {3}{2};5,-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)}+\frac {3 (a+b) (a+2 b+a \cos (2 (e+f x)))^p \sec ^2(e+f x)^{-4+p} \tan (e+f x) \left (\frac {2 b p F_1\left (\frac {3}{2};4,1-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)}{3 (a+b)}-\frac {8}{3} F_1\left (\frac {3}{2};5,-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)\right )}{3 (a+b) F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p F_1\left (\frac {3}{2};4,1-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-4 (a+b) F_1\left (\frac {3}{2};5,-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)}-\frac {3 (a+b) F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) (a+2 b+a \cos (2 (e+f x)))^p \sec ^2(e+f x)^{-4+p} \tan (e+f x) \left (4 \left (b p F_1\left (\frac {3}{2};4,1-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-4 (a+b) F_1\left (\frac {3}{2};5,-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \sec ^2(e+f x) \tan (e+f x)+3 (a+b) \left (\frac {2 b p F_1\left (\frac {3}{2};4,1-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)}{3 (a+b)}-\frac {8}{3} F_1\left (\frac {3}{2};5,-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)\right )+2 \tan ^2(e+f x) \left (b p \left (-\frac {6 b (1-p) F_1\left (\frac {5}{2};4,2-p;\frac {7}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)}{5 (a+b)}-\frac {24}{5} F_1\left (\frac {5}{2};5,1-p;\frac {7}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)\right )-4 (a+b) \left (\frac {6 b p F_1\left (\frac {5}{2};5,1-p;\frac {7}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)}{5 (a+b)}-6 F_1\left (\frac {5}{2};6,-p;\frac {7}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right ) \sec ^2(e+f x) \tan (e+f x)\right )\right )\right )}{\left (3 (a+b) F_1\left (\frac {1}{2};4,-p;\frac {3}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )+2 \left (b p F_1\left (\frac {3}{2};4,1-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )-4 (a+b) F_1\left (\frac {3}{2};5,-p;\frac {5}{2};-\tan ^2(e+f x),-\frac {b \tan ^2(e+f x)}{a+b}\right )\right ) \tan ^2(e+f x)\right ){}^2}\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.22, size = 0, normalized size = 0.00 \[\int \left (\cos ^{6}\left (f x +e \right )\right ) \left (a +b \left (\sec ^{2}\left (f x +e \right )\right )\right )^{p}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\cos \left (e+f\,x\right )}^6\,{\left (a+\frac {b}{{\cos \left (e+f\,x\right )}^2}\right )}^p \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________